{extend name="public/base" /}
{block name='menu'}
<div id="header_content">
    <a id="logo" href="/"><img src="{:setting('logo')}" alt=""></a>
    <ul id="navbar">

        <li class="nav {if empty($pcate)}active{/if}">
            <a href="/">首页</a>
        </li>
        {foreach $category as $v}
        <li class="nav {if isset($pcate) && $v.id==$pcate.id}active{/if}">
            {php}$pid = $v['id']{/php}
            <a href='{:url("/item/$pid")}'>{$v.name ?: ''}</a>
            {notempty name='v.sub'}
            <ul>
                {foreach $v.sub as $vo}
                {php}$id = $vo['id']{/php}
                <li><a href='{:url("/item/$pid-$id")}'>{$vo.name ?: ''}</a></li>
                {/foreach}
            </ul>
            {/notempty}
        </li>
        {/foreach}
    </ul>
</div>
<!-- 侧边栏 -->
<ul id="sidebar">
    <li>
        <img src="__STATIC__/index/img/tel2.png" alt="">
        <p>{:setting('kefu_tel')}</p>
    </li>
    <li>
        <img src="__STATIC__/index/img/weixin.png" alt="">
        <p>微信公众号</p>
        <div class="qrcode">
            {if setting('ewm_d','status')==1}
            <p class="img"><img src="{:setting('ewm_d')}" alt=""></p>
            <p class="title">订阅号</p>
            {/if}
            {if setting('ewm_f','status')==1}
            <p class="img"><img src="{:setting('ewm_f')}" alt=""></p>
            <p class="title">服务号</p>
            {/if}
        </div>
    </li>
    <li>
        <a href='{:url("/contact")}'>
            <img src="__STATIC__/index/img/message.png" alt="">
            <p>在线留言</p>
        </a>
    </li>
    <li>
        <img src="__STATIC__/index/img/consultation.png" alt="">
        <p>立即咨询</p>
    </li>
    <li id="back_top">
        <img src="__STATIC__/index/img/backtop.png" alt="">
        <p>返回顶端</p>
    </li>
    <li>
        <img src="__STATIC__/index/img/phone.png" alt="">
        <p>进入手机版</p>
        <div class="qrcode" style="top: 300px">
            <p class="img"><img src="{:setting('ewm')}" alt=""></p>
            <p class="title">扫码进入</p>
        </div>
    </li>
</ul>
<script>
    // 回到顶部
    $("#back_top").on("click", function () {
        $("html,body").animate({
            "scrollTop": 0
        });
    })
</script>
{/block}

{block name='footer'}
<div id="footer_content">
    <ul class="logo">
        {foreach $footer_logo as $v}
        <li><img src="{$v.thumb}" alt=""></li>
        {/foreach}
    </ul>
    <ul class="link">
        <p class="title">{:setting('link','title')}</p>
        {foreach $link as $v}
        {if $v.status==1}
        <li><a href="{$v.value}">{$v.name}</a></li>
        {/if}
        {/foreach}
    </ul>
    <ul class="news">
        <p class="title">{$news_title ?: ''}</p>
        {foreach $news_cate as $v}
        {php}$news_cate_id = $v['id'];{/php}
        <li><a href='{:url("/news/$news_cate_id")}'>{$v.title ?: ''}</a></li>
        {/foreach}
    </ul>
    <ul class="contact">
        <p class="title"><a href='{:url("/contact")}'>{:setting('contactus','title')}</a></p>
        {foreach $contactus as $k=>$v}
        <li>
            <img src="{$v.name}" alt="">
            <p {if $k==0}class="tel"{/if}>{$v.value}</p>
        </li>
        {/foreach}
    </ul>
    <ul class="weixin">
        {if setting('ewm_d','status')==1}
        <li>
            <p class="title">
                <img src="__STATIC__/index/img/weixin.png" alt="">
                <span>订阅号</span>
            </p>
            <img src="{:setting('ewm_d')}" alt="">
        </li>
        {/if}
        {if setting('ewm_f','status')==1}
        <li>
            <p class="title">
                <img src="__STATIC__/index/img/weixin.png" alt="">
                <span>服务号</span>
            </p>
            <img src="{:setting('ewm_f')}" alt="">
        </li>
        {/if}
    </ul>
</div>
<p id="copyright">{:setting('banquan')} {:setting('beian')}</p>
{/block}